/* pages/messages/messages.wxss */
$primary-color: #1677ff;
$gray-light: #f5f5f7;
$gray-medium: #e5e6eb;
$text-primary: #333333;
$text-secondary: #666666;
$text-tertiary: #999999;

.messages-page {
  min-height: 100vh;
  background-color: $gray-light;
  font-size: 28rpx;
  color: $text-primary;

  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20rpx 30rpx;
    background-color: #fff;
    border-bottom: 1px solid $gray-medium;

    .title {
      font-size: 34rpx;
      font-weight: bold;
    }

    .mark-all-read {
      color: $primary-color;
      background: transparent;
      font-size: 28rpx;
      padding: 0;
      height: auto;
      line-height: normal;
    }
  }

  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100rpx 0;

    .loading-spinner {
      width: 50rpx;
      height: 50rpx;
      border: 4rpx solid $gray-medium;
      border-top-color: $primary-color;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    .loading-text {
      margin-top: 20rpx;
      color: $text-tertiary;
    }
  }

  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 150rpx 0;

    .empty-image {
      width: 200rpx;
      margin-bottom: 30rpx;
    }

    .empty-text {
      color: $text-tertiary;
      font-size: 30rpx;
    }
  }

  .messages-list {
    padding: 20rpx;

    .section-header {
      padding: 15rpx 10rpx;

      .section-title {
        font-size: 26rpx;
        color: $text-tertiary;
        background-color: rgba(0, 0, 0, 0.03);
        padding: 5rpx 15rpx;
        border-radius: 4rpx;
      }
    }

    .message-group {
      margin-bottom: 20rpx;
    }
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
